<include file="public@header"/>
</head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a>角色列表</a></li>
        <li><a href="{:url('user/adminIndex/add_role',array('id'=>input('id')))}">添加角色</a></li>
    </ul>
    <br/>
    <form method="post" class="js-ajax-form">
        <table class="table table-hover table-bordered">
            <thead>
            <tr>
                <th>ID</th>
                <th>角色</th>
                <th>组织</th>
                <th>姓名</th>
                <th>工号</th>
                <th>业务员类型</th>
                <th>预售功能</th>
                <th>发货工厂</th>
                <th>{:lang('ACTIONS')}</th>
            </tr>
            </thead>
            <tbody>
            <php>$type_list = ['0'=>'否','1'=>'内部业务员','2'=>'经销商'];</php>
            <foreach name="list" item="vo">
                <tr>
                    <td>{$vo.id}</td>
                    <td>{:lang('role_list')[$vo.role]}</td>
                    <td>{$vo.factory.fname}</td>
                    <td>{$vo.name}</td>
                    <td>{$vo.fempnumber}</td>
                    <td>{$type_list[$vo.type]}</td>
                    <td><if $vo.yushou>有<else/>无</if></td>
                    <td>{:factory_names($vo.out_ids)}</td>
                    <td>
                        <!-- <if $vo.role == 1>
                        <a class="btn btn-xs btn-primary" href="{:url('user/adminIndex/edit_role',array('id'=>$vo['id']))}">{:lang('EDIT')}</a>
                        </if> -->
                        <a class="btn btn-xs btn-danger js-ajax-delete" href="{:url('user/adminIndex/del_role',array('id'=>$vo['id']))}">{:lang('DELETE')}</a>
                    </td>
                </tr>
            </foreach>
            </tbody>
        </table>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>